FROM centos:7.5.1804
 
ADD jdk-8u121-linux-x64.tar.gz /usr/java
COPY env.sh /opt/
RUN mkdir -p /usr/share/java
COPY mysql-connector-java.jar /usr/share/java
 
RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
 && chmod 755 /opt/env.sh \
 && bash /opt/env.sh && source /etc/profile \
 && yum -y install perl wget /sbin/service
 
WORKDIR /opt
RUN wget http://192.168.83.132/cdh6.3/cm6.3/cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm   \
 && wget http://192.168.83.132/cdh6.3/cm6.3/cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm   \
 && rpm -ivh /opt/cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm \
 && rpm -ivh /opt/cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm  \
 && rm -rf /opt/*.rpm
 
EXPOSE 7180 7182
 
CMD ["systemctl start cloudera-scm-server"]